﻿using System.Collections.Generic;
using Kobets.Automation.Chimera.Orchestrator.Models;

namespace Kobets.Automation.Chimera.Orchestrator.Shared
{
    public class VersionModelComparer : IEqualityComparer<VersionModel>
    {
        public bool Equals(VersionModel x, VersionModel y)
        {
            return x.Version == y.Version;
        }

        public int GetHashCode(VersionModel obj)
        {
            return obj.Version == null ? 0 : obj.Version.GetHashCode();
        }
    }
}
